package org.ix.gateway.route.model.request;

import org.ix.gateway.route.model.BaseEntity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.*;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@ApiModel(description = "网关路由新增请求实体")
@Getter
@Setter
@ToString
public class GatewayRouteAddRequest extends BaseEntity {

    @ApiModelProperty(value = "路由id", position = 1, required = true)
    @NotBlank(message = "id(路由id)不能为空")
    private String id;

    @ApiModelProperty(value = "转发目标uri", position = 2, required = true)
    @NotBlank(message = "uri(转发目标uri)不能为空")
    private String uri;

    @ApiModelProperty(value = "断言集合JSON", position = 3)
    private String predicates;

    @ApiModelProperty(value = "过滤器集合JSON", position = 4)
    private String filters;

    @ApiModelProperty(value = "Metadata", position = 5)
    private String metadata;

    @ApiModelProperty(value = "路由执行顺序", position = 6)
    private Integer routeOrder;
}
